<template>
  <div>
    <el-page-header @back="goBack" content="数据集管理信息"> </el-page-header>
    <el-form ref="form" :model="form" label-width="80px">
      <el-form-item label="应用名称">
        <el-input v-model="form.name"></el-input>
      </el-form-item>
      <el-form-item label="介绍">
        <el-input v-model="form.introduce"></el-input>
      </el-form-item>
      <el-form-item label="照片链接">
        <el-input v-model="form.photo"></el-input>
      </el-form-item>
    </el-form>
    <div style="text-align:right">
    <el-button type="primary" @click="submit">
      提交
    </el-button>
    
    </div>

  </div>
</template>
    
<script>
import { post } from "@/utils/request";
export default {
  data() {
    return {
      content: "新增数据集管理信息",
      form: {}
    };
  },
  methods: {
    submit() {
      let url = "http://120.77.41.127:8888/dataset/saveOrUpdate";
      post(url, this.form).then(resp => {
        this.$message({ type: "success", message: resp.message });
        this.goBack();
      });
    },
    goBack() {
      this.$router.go(-1);
    }
  },
  created(){
      this.form = this.$route.query;
  }
};
</script>

<style lang="sass" scoped>

</style>